<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>BPNet | infers - v1.4.0</title>
	<meta name="description" content="Documentation for infers - v1.4.0">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">infers - v1.4.0</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../modules.html">infers - v1.4.0</a>
				</li>
				<li>
					<a href="bpnet.html">BPNet</a>
				</li>
			</ul>
			<h1>Class BPNet</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">BPNet</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Constructors</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="bpnet.html#constructor" class="tsd-kind-icon">constructor</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#b" class="tsd-kind-icon">b</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#hlayer" class="tsd-kind-icon">hlayer</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#mode" class="tsd-kind-icon">mode</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#rate" class="tsd-kind-icon">rate</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#scale" class="tsd-kind-icon">scale</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#shape" class="tsd-kind-icon">shape</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="bpnet.html#w" class="tsd-kind-icon">w</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#adjust" class="tsd-kind-icon">adjust</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#af" class="tsd-kind-icon">af</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#backpropagation" class="tsd-kind-icon">back<wbr>Propagation</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#bgd" class="tsd-kind-icon">bgd</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#calcbackpropagation" class="tsd-kind-icon">calc<wbr>Back<wbr>Propagation</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#calcloss" class="tsd-kind-icon">calc<wbr>Loss</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#checkinput" class="tsd-kind-icon">check<wbr>Input</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#checkoutput" class="tsd-kind-icon">check<wbr>Output</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#checksample" class="tsd-kind-icon">check<wbr>Sample</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#cost" class="tsd-kind-icon">cost</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#fit" class="tsd-kind-icon">fit</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#forwardpropagation" class="tsd-kind-icon">forward<wbr>Propagation</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#mbgd" class="tsd-kind-icon">mbgd</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#predict" class="tsd-kind-icon">predict</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#predictnet" class="tsd-kind-icon">predict<wbr>Net</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#scaled" class="tsd-kind-icon">scaled</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#sgd" class="tsd-kind-icon">sgd</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#tojson" class="tsd-kind-icon">toJSON</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="bpnet.html#unit" class="tsd-kind-icon">unit</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="bpnet.html#fromjson" class="tsd-kind-icon">fromJSON</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Constructors</h2>
				<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
					<a name="constructor" class="tsd-anchor"></a>
					<h3>constructor</h3>
					<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">new BPNet<span class="tsd-signature-symbol">(</span>shape<span class="tsd-signature-symbol">: </span><a href="../modules.html#netshape" class="tsd-signature-type" data-tsd-kind="Type alias">NetShape</a>, opt<span class="tsd-signature-symbol">?: </span><a href="../interfaces/bpnetoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BPNetOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="bpnet.html" class="tsd-signature-type" data-tsd-kind="Class">BPNet</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:25</li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>shape: <a href="../modules.html#netshape" class="tsd-signature-type" data-tsd-kind="Type alias">NetShape</a></h5>
								</li>
								<li>
									<h5>opt: <a href="../interfaces/bpnetoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BPNetOptions</a><span class="tsd-signature-symbol"> = {}</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="bpnet.html" class="tsd-signature-type" data-tsd-kind="Class">BPNet</a></h4>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="b" class="tsd-anchor"></a>
					<h3>b</h3>
					<div class="tsd-signature tsd-kind-icon">b<span class="tsd-signature-symbol">:</span> <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:17</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>偏值</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="hlayer" class="tsd-anchor"></a>
					<h3>hlayer</h3>
					<div class="tsd-signature tsd-kind-icon">hlayer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:19</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>隐藏层层数</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="mode" class="tsd-anchor"></a>
					<h3>mode</h3>
					<div class="tsd-signature tsd-kind-icon">mode<span class="tsd-signature-symbol">:</span> <a href="../modules.html#mode" class="tsd-signature-type" data-tsd-kind="Type alias">Mode</a><span class="tsd-signature-symbol"> = &#x27;sgd&#x27;</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:23</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>梯度更新模式</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="rate" class="tsd-anchor"></a>
					<h3>rate</h3>
					<div class="tsd-signature tsd-kind-icon">rate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0.01</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:25</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>学习率</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="scale" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> scale</h3>
					<div class="tsd-signature tsd-kind-icon">scale<span class="tsd-signature-symbol">:</span> <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:21</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>缩放比</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="shape" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> shape</h3>
					<div class="tsd-signature tsd-kind-icon">shape<span class="tsd-signature-symbol">:</span> <a href="../modules.html#netshape" class="tsd-signature-type" data-tsd-kind="Type alias">NetShape</a></div>
					<aside class="tsd-sources">
					</aside>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="w" class="tsd-anchor"></a>
					<h3>w</h3>
					<div class="tsd-signature tsd-kind-icon">w<span class="tsd-signature-symbol">:</span> <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in bpnet.ts:15</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>权值</p>
						</div>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="adjust" class="tsd-anchor"></a>
					<h3>adjust</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">adjust<span class="tsd-signature-symbol">(</span>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span>, dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:197</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>调整权值偏值</p>
									<ul>
										<li>w = w - α * (∂J / ∂w)</li>
										<li>b = b - α * (∂J / ∂hy)</li>
									</ul>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>dy: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li>
									<h5>dw: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="af" class="tsd-anchor"></a>
					<h3>af</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">af<span class="tsd-signature-symbol">(</span>l<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#activationfunction" class="tsd-signature-type" data-tsd-kind="Type alias">ActivationFunction</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:59</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>获取当前层激活函数</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>l: <span class="tsd-signature-type">number</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#activationfunction" class="tsd-signature-type" data-tsd-kind="Type alias">ActivationFunction</a></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="backpropagation" class="tsd-anchor"></a>
					<h3>back<wbr>Propagation</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">back<wbr>Propagation<span class="tsd-signature-symbol">(</span>hy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span>, xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:146</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>多样本求导，
									计算单个样本倒数求和，然后计算平均倒数</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>hy: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span></h4>
							<ul class="tsd-parameters">
								<li class="tsd-parameter">
									<h5>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li class="tsd-parameter">
									<h5>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
							</ul>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="bgd" class="tsd-anchor"></a>
					<h3>bgd</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">bgd<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, opt<span class="tsd-signature-symbol">: </span><a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:227</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>标准梯度下降，
									全部样本导数的平均值</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>opt: <a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="calcbackpropagation" class="tsd-anchor"></a>
					<h3>calc<wbr>Back<wbr>Propagation</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">calc<wbr>Back<wbr>Propagation<span class="tsd-signature-symbol">(</span>hy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span>, xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:177</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>单样本求导，对每个输出单元的求导，对每个权重的求导</p>
									<ul>
										<li>J = 1 / 2 * (hy - y)^2</li>
										<li>∂J / ∂hy[last] = (1 / 2) * 2 * (hy - y) = (hy - y) * hy[激活函数求导]</li>
										<li>∂J / ∂w = dy.T * lastHy</li>
										<li>∂J / ∂hy[now] = (nextDy * nextW) * hy[激活函数求导]</li>
									</ul>
								</div>
								<p>链式求导法则：</p>
								<ul>
									<li>反向的计算过程；</li>
									<li>分支节点相加；链路节点相乘法；</li>
									<li>如有激活函数需乘激活函数的导数；</li>
								</ul>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>hy: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span></h4>
							<ul class="tsd-parameters">
								<li class="tsd-parameter">
									<h5>dw<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li class="tsd-parameter">
									<h5>dy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h5>
								</li>
							</ul>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="calcloss" class="tsd-anchor"></a>
					<h3>calc<wbr>Loss</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">calc<wbr>Loss<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:217</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>计算一组样本的当前损失</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="checkinput" class="tsd-anchor"></a>
					<h3>check<wbr>Input</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">check<wbr>Input<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:305</li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="checkoutput" class="tsd-anchor"></a>
					<h3>check<wbr>Output</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">check<wbr>Output<span class="tsd-signature-symbol">(</span>ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:311</li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="checksample" class="tsd-anchor"></a>
					<h3>check<wbr>Sample</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">check<wbr>Sample<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:317</li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="cost" class="tsd-anchor"></a>
					<h3>cost</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">cost<span class="tsd-signature-symbol">(</span>hy<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:207</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>平方差带价函数
									多输出求平均值</p>
									<ul>
										<li>J = 1 / 2 * m * ∑m(hy - ys) ** 2</li>
									</ul>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>hy: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="fit" class="tsd-anchor"></a>
					<h3>fit</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">fit<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, opt<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:325</li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>opt: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = {}</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="forwardpropagation" class="tsd-anchor"></a>
					<h3>forward<wbr>Propagation</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">forward<wbr>Propagation<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:100</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>计算整个网络输出</p>
									<ul>
										<li>layer[hy][t-1] * w[t] + b</li>
										<li>hy =  θ1 * X1 + θ2 * X2 + ... + θn * Xn + b</li>
									</ul>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>inputs</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="mbgd" class="tsd-anchor"></a>
					<h3>mbgd</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">mbgd<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, opt<span class="tsd-signature-symbol">: </span><a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:272</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>批量梯度下降，
									多个样本导数的平均值</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>opt: <a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="predict" class="tsd-anchor"></a>
					<h3>predict</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">predict<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:127</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>预测最后一层输出</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="predictnet" class="tsd-anchor"></a>
					<h3>predict<wbr>Net</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">predict<wbr>Net<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:135</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>预测整个网络，包含输入层</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">[]</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="scaled" class="tsd-anchor"></a>
					<h3>scaled</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">scaled<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:114</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>按照缩放比缩放新的特征</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="sgd" class="tsd-anchor"></a>
					<h3>sgd</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">sgd<span class="tsd-signature-symbol">(</span>xs<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, ys<span class="tsd-signature-symbol">: </span><a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a>, opt<span class="tsd-signature-symbol">: </span><a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:246</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>随机梯度下降，
									单个样本的导数</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>xs: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>ys: <a href="matrix.html" class="tsd-signature-type" data-tsd-kind="Class">Matrix</a></h5>
								</li>
								<li>
									<h5>opt: <a href="../interfaces/trainingoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TrainingOptions</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="tojson" class="tsd-anchor"></a>
					<h3>toJSON</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">toJSON<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:67</li>
								</ul>
							</aside>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>json字符串</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="unit" class="tsd-anchor"></a>
					<h3>unit</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">unit<span class="tsd-signature-symbol">(</span>l<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:51</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>获取当前层单元数</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>l: <span class="tsd-signature-type">number</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
					<a name="fromjson" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> fromJSON</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
						<li class="tsd-signature tsd-kind-icon">fromJSON<span class="tsd-signature-symbol">(</span>json<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="bpnet.html" class="tsd-signature-type" data-tsd-kind="Class">BPNet</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in bpnet.ts:82</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>加载json化的模型</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>json: <span class="tsd-signature-type">string</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="bpnet.html" class="tsd-signature-type" data-tsd-kind="Class">BPNet</a></h4>
							<p>BPNet</p>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="../modules.html">Exports</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-enum">
						<a href="../enums/channel.html" class="tsd-kind-icon">Channel</a>
					</li>
				</ul>
				<ul class="current">
					<li class="current tsd-kind-class">
						<a href="bpnet.html" class="tsd-kind-icon">BPNet</a>
						<ul>
							<li class=" tsd-kind-constructor tsd-parent-kind-class">
								<a href="bpnet.html#constructor" class="tsd-kind-icon">constructor</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#b" class="tsd-kind-icon">b</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#hlayer" class="tsd-kind-icon">hlayer</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#mode" class="tsd-kind-icon">mode</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#rate" class="tsd-kind-icon">rate</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#scale" class="tsd-kind-icon">scale</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#shape" class="tsd-kind-icon">shape</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="bpnet.html#w" class="tsd-kind-icon">w</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#adjust" class="tsd-kind-icon">adjust</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#af" class="tsd-kind-icon">af</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#backpropagation" class="tsd-kind-icon">back<wbr>Propagation</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#bgd" class="tsd-kind-icon">bgd</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#calcbackpropagation" class="tsd-kind-icon">calc<wbr>Back<wbr>Propagation</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#calcloss" class="tsd-kind-icon">calc<wbr>Loss</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#checkinput" class="tsd-kind-icon">check<wbr>Input</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#checkoutput" class="tsd-kind-icon">check<wbr>Output</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#checksample" class="tsd-kind-icon">check<wbr>Sample</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#cost" class="tsd-kind-icon">cost</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#fit" class="tsd-kind-icon">fit</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#forwardpropagation" class="tsd-kind-icon">forward<wbr>Propagation</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#mbgd" class="tsd-kind-icon">mbgd</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#predict" class="tsd-kind-icon">predict</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#predictnet" class="tsd-kind-icon">predict<wbr>Net</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#scaled" class="tsd-kind-icon">scaled</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#sgd" class="tsd-kind-icon">sgd</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#tojson" class="tsd-kind-icon">toJSON</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="bpnet.html#unit" class="tsd-kind-icon">unit</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
								<a href="bpnet.html#fromjson" class="tsd-kind-icon">fromJSON</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
					<li class=" tsd-kind-class">
						<a href="edge.html" class="tsd-kind-icon">Edge</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="matrix.html" class="tsd-kind-icon">Matrix</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="point.html" class="tsd-kind-icon">Point</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="polygon.html" class="tsd-kind-icon">Polygon</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="rnn.html" class="tsd-kind-icon">RNN</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/bpnetoptions.html" class="tsd-kind-icon">BPNet<wbr>Options</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/generatematrixoptions.html" class="tsd-kind-icon">Generate<wbr>Matrix<wbr>Options</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/rnnforwardresult.html" class="tsd-kind-icon">RNNForward<wbr>Result</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/rnnoptions.html" class="tsd-kind-icon">RNNOptions</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/rnntrainingoptions.html" class="tsd-kind-icon">RNNTraining<wbr>Options</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="../interfaces/trainingoptions.html" class="tsd-kind-icon">Training<wbr>Options</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="../modules.html#activationfunction" class="tsd-kind-icon">Activation<wbr>Function</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="../modules.html#mode" class="tsd-kind-icon">Mode</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="../modules.html#netshape" class="tsd-kind-icon">Net<wbr>Shape</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#afd" class="tsd-kind-icon">afd</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#afn" class="tsd-kind-icon">afn</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#defaulttrainingoptions" class="tsd-kind-icon">default<wbr>Training<wbr>Options</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#imagedatatomatrix" class="tsd-kind-icon">image<wbr>Data<wbr>ToMatrix</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#tofixed" class="tsd-kind-icon">to<wbr>Fixed</a>
					</li>
					<li class=" tsd-kind-function">
						<a href="../modules.html#upset" class="tsd-kind-icon">upset</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>